<template>
  <div class="employees-container">
    <div class="app-container">
      <el-card>
        <el-tabs>
          <el-tab-pane label="登录账户设置">
            <LoginSetting :user-date="userDate" />
          </el-tab-pane>
          <el-tab-pane label="个人详情">
            <UserInfo :user-date="userDate" />
          </el-tab-pane>
        </el-tabs>
      </el-card>
    </div>
  </div>
</template>

<script>
import UserInfo from '@/views/employees/components/user-info.vue'
import LoginSetting from '@/views/employees/components/login-setting.vue'
import { getUserDetailById } from '@/api/user.js'

export default {
  components: {
    UserInfo,
    LoginSetting
  },
  data() {
    return {
      userDate: {}
    }
  },
  created() {
    this.gerUesrDate()
  },
  methods: {
    async gerUesrDate() {
      const userDate = await getUserDetailById(this.$route.params.id)
      this.userDate = userDate
    }
  }
}
</script>

<style></style>
